projects
/
babl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
68c0d13
)
babl: always allocate enough memory
author
Massimo Valentini
<mvalentini@src.gnome.org>
Wed, 5 Dec 2012 18:22:36 +0000
(19:22 +0100)
committer
Massimo Valentini
<mvalentini@src.gnome.org>
Wed, 5 Dec 2012 18:24:19 +0000
(19:24 +0100)
babl/babl-fish-reference.c
patch
|
blob
|
history
diff --git
a/babl/babl-fish-reference.c
b/babl/babl-fish-reference.c
index 05bdc8732a94fced831b2fd2a48030ee93b891cd..abb1b481eda2e928af8dde8098ccdd229e043686 100644
(file)
--- a/
babl/babl-fish-reference.c
+++ b/
babl/babl-fish-reference.c
@@
-289,9
+289,12
@@
process_same_model (const Babl *babl,
babl_log ("args=(%p, %p, %p, %li): trying to handle BablImage (unconfirmed code)",
babl_fish, source, destination, n);
}
+#define MAX(a, b) ((a) > (b) ? (a) : (b))
double_buf = babl_malloc (sizeof (double) * n *
- BABL (babl->fish.source)->format.model->components);
+ MAX (BABL (babl->fish.source)->format.model->components,
+ BABL (babl->fish.source)->format.components));
+#undef MAX
if (
(BABL (babl->fish.source)->format.components ==